package top.eggcode.system.modules.monitor.model;

import lombok.Data;
import top.eggcode.common.model.UidGenerator;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.time.LocalDateTime;

/**
 * 指标数据
 */
@Table(name = "host_metric_usage")
@Entity
@Data
public class MetricUsage {
    @Id
    private String id;

    private String metricId;

    private String value;

    private String instanceId;

    private LocalDateTime created;

    public void init() {
        this.id = UidGenerator.apply();
        this.created = LocalDateTime.now();
    }
}
